/**
* 版权所有：福建邮科电信业务部厦门研发中心 
*====================================================
* 文件名称: ZBSGCActionInfoMeta.java
* 修订记录：
* No    日期				作者(操作:具体内容)
* 1.    2013-4-1			詹保山(创建:创建文件)
*====================================================
* 类描述：(说明未实现或其它不应生成javadoc的内容)
* 
*/
package com.devframe.gc.meta;
public class ZBSGCMethodInfoMeta  extends ZBSGCInfoMeta{
	private String actionUrlSuffix=".do";
//ACTION 相关	
	/*
	 * 创建相关方法
	 */
	private String createPageMethod;
	private String createPageUrl;
	
	private String createMethod;
	private String createUrl;
	
	//列表方法
	private String listMethod;
	
	private String listUrl;
	
	//修改相关方法
	private String updatePageMethod;
	private String updatePageUrl;
	
	private String updateMethod;
	
	private String updateUrl;
	
	//删除方法
	private String deleteMethod;
	
	private String deleteUrl;
	
	private String viewPageMethod;
	private String viewPageUrl;
	
	private String actionName;
/////////////////////////////////////////////Service 相关
	private String serviceCreateMethod;
	
	private String serviceUpdateMethod;
	
	private String serviceDeleteMethod;
	
	private String serviceGetMethod;
	
	private String serviceQueryListMethod;
	
	private String serviceQueryPageMethod;
	
/////////////////////DAO////////////////////////////
	
	private String daoQueryListMethod;
	
	private String daoQueryPageMethod;
	
	
	
	private void buildActionMethod(){
		this.createPageMethod=getBeanMeta().getEntityName()+"CreatePage";
		
		this.createMethod=this.getBeanMeta().getEntityName()+"Create";
		
		this.listMethod=this.getBeanMeta().getEntityName()+"List";
		
		
		this.updatePageMethod=this.getBeanMeta().getEntityName()+"UpdatePage";
		
		this.updateMethod=this.getBeanMeta().getEntityName()+"Update";
		
		this.deleteMethod=this.getBeanMeta().getEntityName()+"Delete";
		
		this.viewPageMethod=this.getBeanMeta().getEntityName()+"ViewPage";
	}
	
	private void  buildServiceMethod(){
		this.serviceCreateMethod="create"+this.getBeanMeta().getClazzName();
		this.serviceUpdateMethod="update"+this.getBeanMeta().getClazzName();
		this.serviceDeleteMethod="delete"+this.getBeanMeta().getClazzName();
		this.serviceGetMethod="get"+this.getBeanMeta().getClazzName();
		this.serviceQueryListMethod="query"+this.getBeanMeta().getClazzName()+"OfList";
		this.serviceQueryPageMethod="query"+this.getBeanMeta().getClazzName()+"OfPage";
	}
	
	private void buildDaoMethod(){
		this.daoQueryListMethod="query"+this.getBeanMeta().getClazzName()+"OfList";
		this.daoQueryPageMethod="query"+this.getBeanMeta().getClazzName()+"OfPage";;
	}
	
	public ZBSGCMethodInfoMeta(ZBSGCBeanInfoMeta beanMeta){
		super(beanMeta);
		this.buildActionMethod();
		
		//Service 相关方法
		buildServiceMethod();
		//dao 相关方法
		buildDaoMethod();
	}

	public String getCreatePageMethod() {
		return createPageMethod;
	}


	public String getCreateMethod() {
		return createMethod;
	}
	

	public String getListMethod() {
		return listMethod;
	}


	public String getUpdatePageMethod() {
		return updatePageMethod;
	}

	public String getUpdateMethod() {
		return updateMethod;
	}

	public String getDeleteMethod() {
		return deleteMethod;
	}

 

	public String getCreatePageUrl() {
		this.createPageUrl=this.getActionName()+"!"+this.createPageMethod+actionUrlSuffix;
		return createPageUrl;
	}

	public String getCreateUrl() {
		this.createUrl=this.getActionName()+"!"+this.createMethod+actionUrlSuffix;
		return createUrl;
	}

	public String getListUrl() {
		this.listUrl=this.getActionName()+"!"+this.listMethod+this.actionUrlSuffix;
		return listUrl;
	}

	public String getUpdatePageUrl() {
		this.updatePageUrl=this.getActionName()+"!"+this.updatePageMethod+this.actionUrlSuffix;
		return updatePageUrl;
	}

	public String getUpdateUrl() {
		this.updateUrl=this.getActionName()+"!"+this.updateMethod+this.actionUrlSuffix;
		return updateUrl;
	}

	public String getDeleteUrl() {
		this.deleteUrl=this.getActionName()+"!"+this.deleteMethod+this.actionUrlSuffix;
		return deleteUrl;
	}

	
	public String getActionName() {
		if(actionName==null ||"".equals(this.actionName)){
			this.actionName=this.getBeanMeta().getEntityName();
		}
		return actionName;
	}

	public String getViewPageMethod() {
		return viewPageMethod;
	}

	public String getViewPageUrl() {
		this.viewPageUrl=this.getActionName()+"!"+this.viewPageMethod+this.actionUrlSuffix;
		return viewPageUrl;
	}

	public String getServiceCreateMethod() {
		return serviceCreateMethod;
	}

	public String getServiceUpdateMethod() {
		return serviceUpdateMethod;
	}

	public String getServiceDeleteMethod() {
		return serviceDeleteMethod;
	}

	public String getServiceGetMethod() {
		return serviceGetMethod;
	}

	public String getServiceQueryListMethod() {
		return serviceQueryListMethod;
	}

	public String getActionUrlSuffix() {
		return actionUrlSuffix;
	}

	public String getServiceQueryPageMethod() {
		return serviceQueryPageMethod;
	}

	public String getDaoQueryListMethod() {
		return daoQueryListMethod;
	}

	public String getDaoQueryPageMethod() {
		return daoQueryPageMethod;
	}
	
	
 
	
	
}
